package com.example.mylearn.proxy.learn.once.dynamicProxy.jdkProxy;

import java.awt.geom.AffineTransform;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class CallKafkaHandler implements InvocationHandler {

    Object target;

    public CallKafkaHandler(Object target)
    {
        this.target = target;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("jdk动态代理开始调用");
        final Object invoke = method.invoke(target, args);
        System.out.println("jdk动态代理结束调用");
        return invoke;
    }

}
